package edu.scau.cxq.gp.common.result;

/**
 * @description 统一通用枚举
 * @return
 * @author TLC
 */

public enum ResultCode {
  SUCCESS(200, "成功"),
  BAD_REQUEST(400, "请求出错"),
  UNAUTHORIZED(401, "授权失败"),
  FORBIDDEN(403, "拒绝访问"),
  NOT_FOUND(404, "请求错误,未找到该资源"),
  INTERNAL_SERVER_ERROR(500, "服务端错误");

  private Integer code;
  private String message;

  private ResultCode(Integer code, String message) {
    this.code = code;
    this.message = message;
  }

  public Integer code() {
    return this.code;
  }
  public String message() {
    return this.message;
  }
}
